package com.xh.lesson.controller;


import com.xh.lesson.aop.annotation.LogAnnotation;
import com.xh.lesson.service.SysFunService;
import com.xh.lesson.utils.DataResult;
import com.xh.lesson.vo.req.HouseUpdateReqVo;
import com.xh.lesson.vo.resp.DepartChart;
import com.xh.lesson.vo.resp.EnterpriseChart;
import com.xh.lesson.vo.resp.FunChart;
import com.xh.lesson.vo.resp.FunUseChart;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 柴&许
 * @since 2021-07-01
 */
@RestController
@RequestMapping("/sys")
public class SysFunController {
    @Autowired
    private SysFunService funService;

    @PostMapping("/chart/fun")
    public DataResult<FunChart> SelectFun(){
        DataResult result = DataResult.success();
        result.setData(funService.selectFunChart());
        return result;
    }
    @PostMapping("/chart/funuse")
    public DataResult<FunUseChart> SelectFunUse(){
        DataResult result = DataResult.success();
        result.setData(funService.selectFunUseChart());
        return result;
    }
    @PostMapping("/chart/depart")
    public DataResult<DepartChart> SelectDepart(){
        DataResult result = DataResult.success();
        result.setData(funService.selectDepartChart());
        return result;
    }
    @PostMapping("/chart/enterprise")
    public DataResult<EnterpriseChart> SelectEnterprise(){
        DataResult result = DataResult.success();
        result.setData(funService.selectEnterpriseChart());
        return result;
    }




}

